HDDS-15634. Avoid updating container delete transaction ID on SCM delete log append#10566
Conversation
There was a problem hiding this comment.
Thanks @xichen01 . Overall LGTM.
How about we deprecate the ContainerInfo deleteTransactionId entirely by marking proto and fields to be deprecated and adding some comments? Also we might just remove the ContainerManager#updateDeleteTransactionId
…ManagerImpl#updateDeleteTransactionId
deprecate ContainerInfo deleteTransactionId and ContainerStateManagerImpl#updateDeleteTransactionId |
Quick question: why getNextId will wait for addTransactionsToDB? Is it happen only if a new batch of ids is needed? |
| @Deprecated | ||
| void updateDeleteTransactionId(Map<ContainerID, Long> deleteTransactionMap) | ||
| throws IOException; |
There was a problem hiding this comment.
Since this is a local method, we could just delete it without deprecated it.
@szetszwo This is a typical stack. If the cluster's write and delete QPS are high, the end result will be a large number of long-tail allocateSCMBlocks.
|
szetszwo
left a comment
There was a problem hiding this comment.
+1 the change looks good.

What changes were proposed in this pull request?
Reduce long-tail latency of OM allocateBlock
When SCM handles
DeleteScmKeyBlocksrequests,AllocateScmBlockcan see high tail latency becauseSequenceIdGenerator#getNextIdwaits forSCMStateMachineto finish applying DeleteScmKeyBlocks'sDeletedBlockLogStateManagerImpl#addTransactionsToDB.Profiling shows a large part of
DeletedBlockLogStateManagerImpl#addTransactionsToDBtime is spent updating SCM-sideContainerInfo#deleteTransactionId.This field is not used by current SCM business logic, while DN-side delete transaction tracking is maintained independently.
This commit removes the SCM-side
ContainerInfo#deleteTransactionIdupdate fromaddTransactionsToDBto reduce unnecessary StateMachine apply work and improve write tail latency.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15634
How was this patch tested?
existing test
https://github.com/xichen01/ozone/actions/runs/27909174625